AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_init.lua")

include("shared.lua")




local launchSound = Sound("world/jumppad.wav")

function ENT:Initialize()

	//self.Entity:SetModel("models/props_phx/construct/metal_plate2x2.mdl")
		self.Entity:PhysicsInitBox(Vector(-40,-40,0),Vector(40,40,10))
	self.Entity:SetCollisionBounds(Vector(-40,-40,0),Vector(40,40,10))
	self:PhysicsInit( SOLID_VPHYSICS )
	self:SetMoveType( MOVETYPE_NONE )
	self:SetSolid( SOLID_VPHYSICS )
		self.Entity:SetCollisionGroup(COLLISION_GROUP_WEAPON)
	self.Entity:SetTrigger(true)	

	//	local phys = self:GetPhysicsObject()
		//if (phys:IsValid()) then phys:Wake() end
end




function ENT:Think()

end

function ENT:Touch(e)
	if e && e:IsValid() && e:IsPlayer() then
		//if (e:GetPos() - self.Entity:GetPos()):Dot(self.Entity:GetUp()) < 0 then
			self:EmitSound(launchSound,40,400)
			e:SetGroundEntity()
			e:Fire("ignorefalldamage","",0)
			e:SetLocalVelocity(self.Entity:GetUp() * 800)
		//end
	end
end
	